<?php
// +----------------------------------------------------------------------
// | wttai [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.wttai.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 老司机 <wutongtai@wttai.com> <http://www.thinkphp.cn>
// +----------------------------------------------------------------------

/**
 * 前台配置文件
 * 所有除开系统级别的前台配置
 */
return array(
    /* 数据缓存设置 */
    'DATA_CACHE_PREFIX'    => 'wttai_', // 缓存前缀
    'DATA_CACHE_TYPE'      => 'File', // 数据缓存类型
    'URL_MODEL'            => 3, //URL模式

    /* 文件上传相关配置 */
    'DOWNLOAD_UPLOAD' => array(
        'mimes'    => '', //允许上传的文件MiMe类型
        'maxSize'  => 5*1024*1024, //上传的文件大小限制 (0-不做限制)
        'exts'     => 'jpg,gif,png,jpeg,zip,rar,tar,gz,7z,doc,docx,txt,xml', //允许上传的文件后缀
        'autoSub'  => true, //自动子目录保存文件
        'subName'  => array('date', 'Ymd'), //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
        'rootPath' => STATIC_PATH.'uploads/download/', //保存根路径
        'savePath' => '', //保存路径
        'saveName' => array('uniqid', ''), //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
        'saveExt'  => '', //文件保存后缀，空则使用原后缀
        'replace'  => false, //存在同名是否覆盖
        'hash'     => true, //是否生成hash编码
        'callback' => false, //检测文件是否存在回调函数，如果存在返回文件信息数组
    ), //下载模型上传配置（文件上传类配置）

    /* 图片上传相关配置 */
    'PICTURE_UPLOAD' => array(
		'mimes'    => '', //允许上传的文件MiMe类型
		'maxSize'  => 2*1024*1024, //上传的文件大小限制 (0-不做限制)
		'exts'     => 'jpg,gif,png,jpeg', //允许上传的文件后缀
		'autoSub'  => true, //自动子目录保存文件
		'subName'  => array('date', 'Ymd'), //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
		'rootPath' => STATIC_PATH.'uploads/img/', //保存根路径
		'savePath' => '', //保存路径
		'saveName' => array('uniqid', ''), //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
		'saveExt'  => '', //文件保存后缀，空则使用原后缀
		'replace'  => false, //存在同名是否覆盖
		'hash'     => true, //是否生成hash编码
		'callback' => false, //检测文件是否存在回调函数，如果存在返回文件信息数组
    ), //图片上传相关配置（文件上传类配置）

    'PICTURE_UPLOAD_DRIVER'=>'local',
    //本地上传文件驱动配置
    'UPLOAD_LOCAL_CONFIG'=>array(),
    'UPLOAD_BCS_CONFIG'=>array(
        'AccessKey'=>'',
        'SecretKey'=>'',
        'bucket'=>'',
        'rename'=>false
    ),
    'UPLOAD_QINIU_CONFIG'=>array(
        'accessKey'=>'__ODsglZwwjRJNZHAu7vtcEf-zgIxdQAY-QqVrZD',
        'secrectKey'=>'Z9-RahGtXhKeTUYy9WCnLbQ98ZuZ_paiaoBjByKv',
        'bucket'=>'wttaitest',
        'domain'=>'wttaitest.u.qiniudn.com',
        'timeout'=>3600,
    ),


    /* 编辑器图片上传相关配置 */
    'EDITOR_UPLOAD' => array(
		'mimes'    => '', //允许上传的文件MiMe类型
		'maxSize'  => 2*1024*1024, //上传的文件大小限制 (0-不做限制)
		'exts'     => 'jpg,gif,png,jpeg', //允许上传的文件后缀
		'autoSub'  => true, //自动子目录保存文件
		'subName'  => array('date', 'Ymd'), //子目录创建方式，[0]-函数名，[1]-参数，多个参数使用数组
		'rootPath' => STATIC_PATH.'uploads/images/', //保存根路径
		'savePath' => '', //保存路径
		'saveName' => array('uniqid', ''), //上传文件命名规则，[0]-函数名，[1]-参数，多个参数使用数组
		'saveExt'  => '', //文件保存后缀，空则使用原后缀
		'replace'  => false, //存在同名是否覆盖
		'hash'     => true, //是否生成hash编码
		'callback' => false, //检测文件是否存在回调函数，如果存在返回文件信息数组
    ),

    /* 模板相关配置 */
    'TMPL_PARSE_STRING' => array(
        '__STATIC__' => __ROOT__ . '/Public/static',
        '__ADDONS__' => __ROOT__ . '/Public/' . MODULE_NAME . '/Addons',
        '__IMG__'    => __ROOT__ . '/Public/' . MODULE_NAME . '/images',
        '__CSS__'    => __ROOT__ . '/Public/' . MODULE_NAME . '/css',
        '__JS__'     => __ROOT__ . '/Public/' . MODULE_NAME . '/js',
    ),

    /* SESSION 和 COOKIE 配置 */
    'SESSION_PREFIX' => 'wttai_admin', //session前缀
    'COOKIE_PREFIX'  => 'wttai_admin_', // Cookie前缀 避免冲突
    'VAR_SESSION_ID' => 'session_id',	//修复uploadify插件无法传递session_id的bug

    /* 后台错误页面模板 */
    'TMPL_ACTION_ERROR'     =>  MODULE_PATH.'View/Public/error.html', // 默认错误跳转对应的模板文件
    'TMPL_ACTION_SUCCESS'   =>  MODULE_PATH.'View/Public/success.html', // 默认成功跳转对应的模板文件
    'TMPL_EXCEPTION_FILE'   =>  MODULE_PATH.'View/Public/exception.html',// 异常页面的模板文件
    'TIETU_URL'=>"http://up.imgapi.com/",
    //'TIETU_TOKEN'=>"3ee2fb90ba6e91ef3b418e7c4498e1fbeaa08467:NHeCs9ditPBoVE4r_feUEk2sDS8=:eyJkZWFkbGluZSI6MTQ5MjIzNjAzOSwiYWN0aW9uIjoiZ2V0IiwidWlkIjoiNTkwOTI5IiwiYWlkIjoiMTI5NDIwMiIsImZyb20iOiJ3ZWIifQ==",
    'TIETU_TOKEN'=>"150b8fb60d9eae19b1f237fd804974a7c72430a8:BeiLkL8C9X4zA0fPFOoWGtEgUvY=:eyJkZWFkbGluZSI6MTQ5MTk2ODUxNiwiYWN0aW9uIjoiZ2V0IiwidWlkIjoiNTYzMTkxIiwiYWlkIjoiMTI5NDU2MCIsImZyb20iOiJ3ZWIifQ==",
    'SNS_DEV_AD_URL'=>'http://sns.dev.wttai.com/',
    'SNS_AD_URL'=>'http://huodong.wttai.com/',
    
    
    'SNS_AD'=>array(
        'MOST'=>array(array('filterId'=>1,'filterValue'=>'most','filterName'=>'最新'),array('filterId'=>2,'filterValue'=>'most','filterName'=>'最热')),
        'CITY'=>array(
            array('filterId'=>'广州','filterValue'=>'city','filterName'=>'广州'),
            array('filterId'=>'北京','filterValue'=>'city','filterName'=>'北京'),
            array('filterId'=>'上海','filterValue'=>'city','filterName'=>'上海'),
            array('filterId'=>'南京','filterValue'=>'city','filterName'=>'南京'),
            array('filterId'=>'深圳','filterValue'=>'city','filterName'=>'深圳'),
            array('filterId'=>'成都','filterValue'=>'city','filterName'=>'成都'),
            array('filterId'=>'杭州','filterValue'=>'city','filterName'=>'杭州'),
            array('filterId'=>'武汉','filterValue'=>'city','filterName'=>'武汉'),
            array('filterId'=>'郑州','filterValue'=>'city','filterName'=>'郑州'),
        ),
        'TIME'=>array(
            array('filterId'=>1,'filterValue'=>'time','filterName'=>'今天'),
            array('filterId'=>2,'filterValue'=>'time','filterName'=>'明天'),
            array('filterId'=>3,'filterValue'=>'time','filterName'=>'本周'),
            array('filterId'=>4,'filterValue'=>'time','filterName'=>'本周末'),
            array('filterId'=>5,'filterValue'=>'time','filterName'=>'本月')),
        'ONLYING'=>array(array('filterId'=>1,'filterValue'=>'onlyIng','filterName'=>'免费'),array('filterId'=>2,'filterValue'=>'onlyIng','filterName'=>'进行中')),
        'TYPE'=>array(
            array('filterId'=>0,'filterValue'=>'type','filterName'=>'全部'),
            //会议、展览、论坛、课程、讲座、沙龙、聚会、发布会、赛事、分享会、公开课、其他
            array('filterId'=>1,'filterValue'=>'type','filterName'=>'订货会'),
            array('filterId'=>2,'filterValue'=>'type','filterName'=>'会议'),
            array('filterId'=>3,'filterValue'=>'type','filterName'=>'展览'),
            array('filterId'=>4,'filterValue'=>'type','filterName'=>'论坛'),
            array('filterId'=>5,'filterValue'=>'type','filterName'=>'课程'),
            array('filterId'=>6,'filterValue'=>'type','filterName'=>'讲座'),
            array('filterId'=>7,'filterValue'=>'type','filterName'=>'沙龙'),
            array('filterId'=>8,'filterValue'=>'type','filterName'=>'聚会'),
            array('filterId'=>9,'filterValue'=>'type','filterName'=>'发布会'),
            array('filterId'=>10,'filterValue'=>'type','filterName'=>'赛事'),
            array('filterId'=>11,'filterValue'=>'type','filterName'=>'分享会'),
            array('filterId'=>12,'filterValue'=>'type','filterName'=>'公开课'),
            array('filterId'=>13,'filterValue'=>'type','filterName'=>'其他'))
    ),
    'D2B_AD'=>array(
        'SCENE'=>array(
            array('filterId'=>1,'filterValue'=>'scene','filterName'=>'店铺'),
            array('filterId'=>2,'filterValue'=>'scene','filterName'=>'商品'),),
       'CLASS'=>array(
            array('filterId'=>1,'filterValue'=>'class','filterName'=>'女士'),
            array('filterId'=>2,'filterValue'=>'class','filterName'=>'男士'),
            array('filterId'=>3,'filterValue'=>'class','filterName'=>'童装'),
            array('filterId'=>256,'filterValue'=>'class','filterName'=>'鞋包'),
            array('filterId'=>308,'filterValue'=>'class','filterName'=>'配饰'),
            array('filterId'=>470,'filterValue'=>'class','filterName'=>'生活家居')),
        'SALES'=>array(
            array('filterId'=>1,'filterValue'=>'sales','filterName'=>'销量'),
            array('filterId'=>2,'filterValue'=>'sales','filterName'=>'价格'),),
        'BRAND_CLASS'=>array(
            array('filterId'=>1,'filterValue'=>'brandclass','filterName'=>'女士'),
            array('filterId'=>2,'filterValue'=>'brandclass','filterName'=>'男士'),
            array('filterId'=>3,'filterValue'=>'brandclass','filterName'=>'童装'),
            array('filterId'=>256,'filterValue'=>'brandclass','filterName'=>'鞋包'),
            array('filterId'=>308,'filterValue'=>'brandclass','filterName'=>'配饰'),
            array('filterId'=>470,'filterValue'=>'brandclass','filterName'=>'生活家居')),
         'BRAND_MOST'=>array(
            array('filterId'=>1,'filterValue'=>'brandmost','filterName'=>'最新'),
            array('filterId'=>2,'filterValue'=>'brandmost','filterName'=>'最热'),
          )
    
        
    ),
    
    

);